package com.yitiao.designmodel.create.builder;

public class MainTest {
    public static void main(String[] args) {
        VivoPhoneBuilder builder1 = new VivoPhoneBuilder();
        builder1.buildCpu("888");
        builder1.buildDisk("512");
        builder1.buildMem("16");
        builder1.buildSize("plus");
        Phone phone = builder1.getPhone();
        System.out.println("phone:"+phone);

        VivoPhoneBuilder builder2 = new VivoPhoneBuilder();
        Phone phone1 = builder2
                .buildCpu("888")
                .buildDisk("512")
                .buildMem("16")
                .buildSize("plus")
                .getPhone();
        System.out.println("phone1:"+phone1);


        Phone build = Phone.builder()
                .cpu("888")
                .mem("16")
                .disk("512")
                .size("plus").build();
        System.out.println("builder:"+build);

        StringBuffer stringBuffer = new StringBuffer();
        stringBuffer.append("123");
    }
}
